<script lang="ts">
import { Component, Vue, Prop } from 'vue-property-decorator'
import { CreateElement } from 'vue'

@Component({
  name: 'RenderColorPicker'
})
export default class extends Vue {
  @Prop({ type: String })
  private value!: string | null

  render (h: CreateElement) {
    return h('el-color-picker', {
      attrs: this.$attrs,
      props: { ...this.$attrs, value: this.value },
      on: {
        ...this.$listeners,
        input: (v: string | null) => {
          this.$emit('input', v)
        }
      }
    })
  }
}
</script>
